import request from '@/config/axios'

// 获取客服列表分页
export const getAssistantPage = async (params) => {
  return await request.get({ url: `/service/assistant/page`, params })
}

// 获取客服列表
export const getAssistantList = async () => {
  return await request.get({ url: `/service/assistant/simple-list` })
}
// 创建客服
export const createAssistant = async (data) => {
  return await request.post({ url: `/service/assistant/create`, data })
}
// 更新客服
export const updateAssistant = async (data) => {
  return await request.put({ url: `/service/assistant/update`, data })
}
// 删除客服
export const deleteAssistant = async (id: number) => {
  return await request.delete({ url: `/service/assistant/delete?id=` + id })
}
// 获取客服详情
export const getAssistantConfig = async (id: number) => {
  return await request.get({ url: `/service/assistant/get?id=` + id })
}

// 获取客服分组列表
export const getAssistantSimpleList = async () => {
  return await request.get({ url: `/service/assistant-group/simple-list` })
}
// 创建客服分组
export const createAssistantGroup = async (data) => {
  return await request.post({ url: `/service/assistant-group/create`, data })
}
// 更新客服分组
export const updateAssistantGroup = async (data) => {
  return await request.put({ url: `/service/assistant-group/update`, data })
}
// 删除客服分组
export const deleteAssistantGroup = async (id: number) => {
  return await request.delete({ url: `/service/assistant-group/delete?id=` + id })
}

// 获取欢迎语配置列表
export const welcomeSimpleList = async () => {
  return await request.get({ url: `/service/welcome-config/simple-list` })
}

// 导出客服列表 Excel
export const exportAssistant = async (params) => {
  return await request.download({ url: `/service/assistant/export-excel`, params })
}

// 验证客服账号
export const verifyAssistant = async () => {
  return await request.post({ url: `/service/assistant/verify` })
}
// 客服简介列表
export const introConfigSimpleList = async () => {
  return await request.get({ url: `/service/intro-config/simple-list` })
}
